﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Diagnostics;

namespace NHTrace
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      try
      {
        if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
          throw new Exception("Only one instance of this application can be executed");

        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        Application.Run(new FrmMain());
      }
      catch (Exception ex)
      {
        ExceptionHandler.HandleException(ex);
      }
    }
  }
}
